package org.example.strategy;

/**
 * @author Zhang Yu
 * @description: 策略模式:用来封装算法的,适用于不同时间应用不同的业务规则
 * @date 2024/5/20 14:13
 */
public class Test {

    public static void main(String[] args) {
        CashContext cashContext = new CashContext("打8折");
        double result = cashContext.getResult(100);
        System.out.println("result = " + result);
    }

}
